var OnImage=	{
Load:function()
	{
	fastCSharp.$(document.body).AddEvent('mouseover',fastCSharp.ThisEvent(this,this.MouseOver))
		.AddEvent('mouseout',fastCSharp.ThisEvent(this,this.MouseOut));
	},
Format:function(Src,IsOver)
	{
	var Index=Src.lastIndexOf('.');
	if(Src.substring(Index-3,Index)=='_on')
		{
		if(!IsOver)	return Src.substring(0,Index-3)+Src.substring(Index);
		}
	else if(IsOver)	return Src.substring(0,Index)+'_on'+Src.substring(Index);
	return Src;
	},
GetElement:function(Event)
	{
	var Element=Event.ElementName('onimage');
	if(Element)
		{
		var Parameter=Element.Get('onimage'),Image=Element;
		if(Parameter)
			{
			Parameter=eval('('+Parameter+')');
			if(Parameter.Id)	Image=fastCSharp.$Id(Parameter.Id);
			else if(Parameter.Path)
				{
				var Images=fastCSharp.$(Parameter.Path,Image).GetElements();
				if(Images.length)	Image=fastCSharp.$(Images[0]);
				}
			}
		return {Element:Element,Image:Image,Parameter:Parameter||{}};
		}
	},
MouseOver:function(Event)
	{
	var Value=this.GetElement(Event);
	if(Value)
		{
		var Element=Value.Element,Parameter=Value.Parameter;
		if(Parameter.OutClassName)	Element.Class(Parameter.OutClassName,1);
		if(Parameter.OverClassName)	Element.Class(Parameter.OverClassName);
		Value.Image.Set('src',this.Format(Value.Image.Get('src'),1));
		}
	},
MouseOut:function(Event)
	{
	var Value=this.GetElement(Event);
	if(Value)
		{
		var Element=Value.Element,Parameter=Value.Parameter;
		if(Parameter.OverClassName)	Element.Class(Parameter.OverClassName,1);
		if(Parameter.OutClassName)	Element.Class(Parameter.OutClassName);
		Value.Image.Set('src',this.Format(Value.Image.Get('src'),0));
		}
	}
		};
fastCSharp.OnLoad(OnImage.Load,OnImage,1);